package com.innovation.sys.common.enums;

public enum Res implements IRes{
	COM_SUCCESS(200, "操作成功"),
	COM_FAILED(201, "操作失败"),
	FAILED(601,"操作失败"),
    AUTH_ERROR(401,"认证失败"),
    AUTR_ERROR(402,"授权失败"),
    SYS_ERROR(500,"系统错误"),
    PARAM_ERROR(400,"参数错误"),
    UNKNOWN_ERROR(499,"未知错误"),
	SESSION_NOT_AVAILABLE(0,"session已超时，请重新登录"),
    COM_PARA_NOTVALID(1,"参数名或值无效"),
    COM_IDREF_NOTEXIST(2,"ID对应对象不存在"),
    COM_SERVER_EXCEPTION(3,"服务器异常,请稍后再试"),
    COM_IDREF_ISEXIST(4,"ID对应对象已存在"),
    COM_NAMEREF_ISEXIST(5,"名称对应对象已存在"),
    COM_USER_CANNOT_DO_THIS(6,"用户权限不够"),
    COM_JSON_CONVERT_EXCEPTION(7,"JSON_Body参数转换异常"),
    NUMBER_FORMAT_EXCEPTION(8,"请输入正确的数字"),
    EXCESSIVE_ATTEMPTS_EXCEPTION(9,"连续验证5次失败，请稍后再试"),
    INCORRECT_EXCEPTION(10,"内容请勿包含表情或者特殊字符"),
    SQL_EXCEPTION(11,"SQL解析异常"),
    SQL_NOT_FOUND_EXCEPTION(12,"未找到对应SQL定义"),
    COM_PAGE_PARA_NOTVALID(13,"分页参数值无效"),
    COM_UPDATE_FAILED(14,"修改数据失败"),
    COM_PARA_NULL_ANNO_ERR(15,"参数值为NULL或Class/Method未注解JsonParaToAttr"),
    TYPE_PARA_NOT_AVAILABLE(16,"字典类型参数无效"),
    RECORD_NOT_EXIST(17,"对应记录不存在"),
    REG_NOT_MATCH(18,"验证失败:"),
    OOS_EXCEPTION(19,"文件上传异常"),
    NO_OBJECT_SELECTED(20, "请选择操作对象"),
    DAY_CONT_BEYOND_ONE_MONTH(21, "时间区间不可超过一个月"),
    ADD_SHOULD_NOT_CONTINS_ID(22,"新增方法 参数不可包含id"),
    UPDATE_SHOULD_CONTINS_ID(22, "修改方法 参数应包含id"),
    STATUS_DONT_UPDATE(23, "任务已经停止,请重新开始任务"),
    DONT_START(24,"仅能执行处于等待执行状态或者已经停用和执行完毕的任务"),
    DONGT_NULL(25,"必填数据,不可为空"),
    ACTION_KEY_CANT_NULL(26,"button型权限actionkey不可为空"),
    TOKEN_NOT_EXIST(27,"请登陆账户"),
    TOKEN_NOT_AVAILABLE(28, "无效的token"),
    TOKEN_HAD_LOGOUT(29, "账号已经注销"),
    TOKEN_NOT_BE_VERIFIED(30,"无效的token"),
    DONT_QX(31,"暂时无法接收推送消息"),
    
	USER_NAME_NOT_EXIST(100,"用户名不存在"), 
	USER_PASSWORD_WRONG(101,"用户名或者密码错误"),
	USER_NOT_USE(102, "用户被禁用"),
	USER_EMAIN_FORMAT_WRONG(103,"Email格式错误"),
	USER_PHONE_EXIST(104, "该手机号码已被注册，请更换注册手机号码"),
	USER_MAIL_EXIST(105, "邮箱已存在"),
	USER_EXIST(106,"账号已存在，请重新输入"),
	USER_OLD_PWD_NEW_SAME_WRONG(107,"新旧密码不能相同"),
	USER_HAS_LOST_BIND(108,"账号已解除设备绑定"),
	USER_CANNOT_DO_THIS(109,"权限不够"),
	USER_NOT_EXIST(110,"用户不存在"),
	USER_HAS_DELETED(111,"用户已经被删除"),
	USER_HAS_LOCKED(112,"用户已经被锁住"),
	USER_HAS_FORBIDDEN(113,"用户已经被禁用"),
	USER_SMSCODE_NOTVALID(114,"验证码错误"),
	USER_SMSCODE_GETFAIL(115, "获取验证码失败"),
    USER_ONLINENUM_FULL(116,"用户在当前终端同时登录人数已满，请退出之前登录"),
    OLD_PWD_IS_NOT_TRUE(117,"原密码不正确"),
    USER_BE_BLACK(118,"用户已被加入黑名单"),
    USER_PASSWORD_NOT_EXIST(119,"请设计用户登录密码"),
    TEL_HAD_BE_REGISETED(120,"号码已经被注册过"),
    USER_NAME_HAD_EXISTED(121,"用户名已存在"),
    USER_PASSWORD_NOT_RIGHT(122,"用户登录密码错误"),
    
    PARENT_RESOURCE_NOT_EXIST(500,"所选父资源不存在"),
    PERMS_IS_EXIST(501,"资源标识符不能重复"),
    ROLE_CHECK_EXCEPTION(502,"角色名称或标识符重复"),
    NEWS_PUSH_ERROR(503,"资讯发布失败"),
    GET_MEDIA_ERROR(504,"获取素材失败"),
    TITLE_IS_EXIST(505,"标题不能重复"),
	NEWSTYPE_IS_REPETITION (506,"咨询类型不能重复"),
	NEWSTYPE_DELETE_EXCEPTION (507,"请先删除该类型下的咨询"),
	PARAM_REPEAT(508,"参数名不能重复"),
	SEND_SMSCODE_CANNOT_REPEAT(59,"有效时间内请不要重复发送验证码"),
	NO_FIRST_LV_RESOURCE(510,"权限列表中无一级权限!"),
	RECORD_THAN_ONE(511,"此类型记录最多只能存在一条!"),
	
	ADD_USER_FAILED(130,"添加用户失败!"),
	DEL_USER_FAILED(131,"删除用户失败!"),
	MOD_USER_FAILED(132,"修改用户失败!"),
	QRY_USER_FAILED(133,"查询用户失败！"),
	
	QRY_USRPMN_FAILED(134,"查询用户权限失败！"),
	MOD_USRPMN_FAILED(135,"修改用户权限失败！"),
	
	LOG_OUT_FAILED(136,"登出失败！"),
	
	ADD_ARTICLE_FAILED(137,"添加文章失败!"),
	DEL_ARTICLE_FAILED(138,"删除文章失败!"),
	MOD_ARTICLE_FAILED(139,"修改文章失败!"),
	QRY_ARTICLE_FAILED(140,"查询文章失败！"),
	;
	

	private final int code;
	private final String msg;

	Res(int code,String msg) {
		this.code=code;
		this.msg=msg;
	}

	public int getCode() {
		return code;
	}
	public String getMsg() {
		return msg;
	}
	
}